.gradient-bg {
    background: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%);
}

.chat-container {
    height: calc(100vh - 240px);
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.loading {
    display: none;
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #84fab0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 图谱节点样式 */
.node {
    cursor: pointer;
    transition: all 0.3s ease;
}

.node:hover {
    stroke: #2d8a61;
    stroke-width: 2px;
}

.node.artifact {
    fill: #3b82f6;
}

.node.story {
    fill: #8b5cf6;
}

.node.meaning {
    fill: #10b981;
}

/* 连接线样式 */
.link {
    stroke: #e5e7eb;
    stroke-width: 1.5;
    stroke-opacity: 0.6;
    transition: all 0.3s ease;
}

.link:hover {
    stroke: #2d8a61;
    stroke-width: 2;
    stroke-opacity: 1;
}

/* 工具提示样式 */
.tooltip {
    position: absolute;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    pointer-events: none;
    font-size: 14px;
    z-index: 1000;
    max-width: 300px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tooltip.visible {
    opacity: 1;
}

.tooltip-content {
    color: #374151;
    line-height: 1.5;
}

/* 图谱容器样式 */
.graph-container {
    position: relative;
    border-radius: 1rem;
    background: linear-gradient(to bottom right, #f9fafb, #f3f4f6);
    transition: all 0.3s ease;
}

.graph-container:hover {
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.1);
}
.artifact { fill: #ff5733; }
.meaning { fill: #337ab7; }
.story { fill: #28a745; }
.link { stroke: #999; stroke-opacity: .6; }

.tooltip { 
    position: absolute; 
    background-color: white; 
    border: 1px solid black; 
    padding: 5px; 
    display: none; 
    white-space: pre-wrap; 
    width: 200px; 
}

#details {
    overflow-y: auto;
    height: 100%;
    padding: 10px;
    border-left: 1px solid #ccc;
    background-color: #f8f9fa;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}